package com.lm.activiti.boot.mq.common;

import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;

import java.io.IOException;
import java.util.UUID;
import java.util.concurrent.TimeoutException;

/**
 * @author lm_jcf
 * @date 2020/7/21 16:43
 */
public class ConnectionUtils {

    public static Connection getConnection() throws IOException, TimeoutException {

        ConnectionFactory factory = new ConnectionFactory();

        factory.setHost("192.168.6.200");

        factory.setPort(5672);

        factory.setVirtualHost("lm_jcf");

        factory.setUsername("lm_jcf");

        factory.setPassword("jcf0912");

        return factory.newConnection();
    }
}
